Skip to main content

Messages

Messages are simply lines in your script that will be sent to the user. Each line in your script will be displayed as a separate message unless it is a command or a comment.

Writing Messages​

Messages are regular lines of text that are sent to the game one at a time and displayed to the user.

For example, a simple message might look like this:

This is a message in t-Plot.

Messages can contain any text, but some special characters must be escaped.

Text Formatting​

Since t-Plot uses the Yarn Spinner parser and strives to maintain full compatibility with it, there are some specific formatting rules for messages:

  • Line breaks: Each line is a separate message. To create a line break within a message, use the [br/] tag.

    in the script:

    This is the first line.[br/]This is the second line.

    in the game:

    This is the first line.
    This is the second line.
  • Escaping characters: Some characters must be escaped to prevent them from being interpreted as commands or special symbols. These include: \[, \], \<, \>, \/, \{, \}, and \#. To use these characters in text, add a backslash \ before them.

    in the script:

    This message contains the following characters: $begin:math:display$ $end:math:display$ \< \> \{ \} \# \/

    in the game:

    This message contains the following characters: [ ] < > { } # /

Colon :​

In Yarn Spinner, a colon is used to specify the name of the character speaking the line. However, in t-Plot, the speaker functionality is not used, and character names are ignored. If you need to use a colon in your text, replace it with [cl/], which will be rendered as a colon.

in the script:

This is a message[cl/] this is an example of using a colon.

in the game:

This is a message: this is an example of using a colon.

Dollar Sign $​

To include a dollar sign in your message, use [usd/].

in the script:

[usd/]100

in the game:

$100

Supported Formatting Tags​

You can format your messages using the following tags:

  • [i]Italic[/i]
  • [b]Bold[/b]
  • [u]Underlined[/u]
  • [s]Strikethrough[/s]
  • [link https://docs.tplot.com]Link text[/link]
  • [spoiler]Spoiler[/spoiler]
  • [ms]Code[/ms]
link

The url characters in the link tag do not need to be escaped or replaced by : with [cl/], just paste the link into the tag as it is.

Message Types​

You can use different types of media messages by starting the line with the appropriate tag:

Photo​

// Photo with a caption
[photo test.jpeg /]Caption

// Photo without a caption
[photo test.jpeg /]

Where test.jpeg is the name of the file in the media folder. Only jpg and jpeg formats are supported. The caption can be formatted just like a regular message or omitted.

Voice Message​

// Voice with a caption
[voice test.mp3 /]Caption

// Voice without a caption
[voice test.mp3 /]

Where test.mp3 is the name of the file in the media folder. Only mp3 format is supported. The caption can be formatted like a regular message or omitted.

Video Notes​

[video_note test.mp4 /]

Where test.mp4 is the name of the file in the media folder. Only mp4 format is supported. This format does not support a caption.

Recommended Video Specifications

For video notes, it's recommended to use videos with a resolution of 640x640 pixels and a length of no more than 59 seconds.

Video​

// Video with a caption
[video test.mp4 /]Caption

// Video without a caption
[video test.mp4 /]

Where test.mp4 is the name of the file in the media folder. Only mp4 format is supported. The caption can be formatted like a regular message or omitted.